package com.paireach.scmc.utils;

import android.app.ProgressDialog;
import android.content.Context;

public class ProgressDialogUtil {
    private ProgressDialog pd;

    public ProgressDialogUtil(Context mContext) {
        pd = new ProgressDialog(mContext);
        pd.setMessage("数据加载中...");
        pd.setProgressStyle(ProgressDialog.STYLE_SPINNER);
        pd.setIndeterminate(true);
        pd.setCanceledOnTouchOutside(false);
        pd.setCancelable(false);
    }

    public void showDialog() {
        if (pd != null) {
            pd.show();
        }
    }

    public void dismissDialog() {
        if (pd != null) {
            pd.dismiss();
        }
    }
}
